{extend name="common:base" /}
{block name="header"}
{load href="/static/admin/css/amazeui.upload.css" /}
{/block}
{block name="content"}
<div class="admin-content-body">
    <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">文章管理</strong> /<small>文章编辑</small></div>
        &nbsp;<a id="btn_return" class="am-btn am-btn-default am-btn-xs"><i class="am-icon-reply"></i>&nbsp;返回</a>
    </div>
    <hr>
    <div class="am-tabs am-margin" data-am-tabs>
        <ul class="am-tabs-nav am-nav am-nav-tabs">
            <li class="am-active"><a href="#tab1">基本信息</a></li>
            <li><a href="#tab2">详细信息</a></li>
        </ul>

        <div class="am-tabs-bd">
            <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">所属栏目</div>
                    <div class="am-u-sm-8 am-u-md-10">
                        <select name="cate_id" data-am-selected="{btnSize: 'sm'}">
                            <option value="">选择所属栏目</option>
                            {volist name="catelst" id="cl"}
                            <option value="{$cl.id}">{$cl.name}</option>
                            {/volist}
                        </select>
                    </div>
                </div>

                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">显示状态</div>
                    <div class="am-u-sm-8 am-u-md-10">
                        <div class="am-btn-group" data-am-button>
                            <label class="am-btn am-btn-default am-btn-xs">
                                <input type="radio" name="status" value="1"> 显示
                            </label>
                            <label class="am-btn am-btn-default am-btn-xs">
                                <input type="radio" name="status" value="0"> 隐藏
                            </label>
                        </div>
                    </div>
                </div>

                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">阅读量</div>
                    <div class="am-u-sm-8 am-u-md-10">
                        <input name="pv" type="text" class="am-input-sm">
                    </div>
                </div>

                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right">上传图片</div>
                    <div class="am-u-sm-8 am-u-md-10">
                        <input name="pv" type="text" class="am-input-sm am-hide">
                        <div id="event">dddddddddd</div>
                    </div>
                </div>

            </div>

            <div class="am-tab-panel am-fade" id="tab2">
                <form class="am-form">
                    <div class="am-g am-margin-top">
                        <div class="am-u-sm-4 am-u-md-2 am-text-right">文章标题</div>
                        <div class="am-u-sm-8 am-u-md-4">
                            <input name="title" type="text" class="am-input-sm">
                        </div>
                        <div class="am-hide-sm-only am-u-md-6">*必填，不可重复</div>
                    </div>

                    <div class="am-g am-margin-top-sm">
                        <div class="am-u-sm-12 am-u-md-2 am-text-right admin-form-text">内容描述</div>
                        <div class="am-u-sm-12 am-u-md-10">
                            <textarea name="content" id="content" rows="10" placeholder="请使用富文本编辑插件"></textarea>
                        </div>
                    </div>

                </form>
            </div>

        </div>
    </div>

    <div class="am-margin">
        <button type="button" class="am-btn am-btn-primary am-btn-xs">提交保存</button>
        <button type="button" class="am-btn am-btn-primary am-btn-xs">放弃保存</button>
    </div>
</div>
{/block}
{block name="footer"}
{load href="http://ueditor.baidu.com/ueditor/ueditor.config.js" /}
{load href="http://ueditor.baidu.com/ueditor/ueditor.all.js" /}
{load href="/static/admin/js/amazeui.upload.js" /}
{load href="/static/admin/js/amazeui.upload.template.js" /}
{load href="/static/admin/js/amazeui.upload.event.js" /}
<script type="text/javascript">
    $(function () {
        var editor = UE.getEditor('content');
        $('#event').AmazeuiUpload({
            url:'/article/doupload'
        });
    });
</script>

{/block}